// @ 符号在build/webpack.base.conf.js 中配置 表示 'src' 路径
import request from '@/utils/request'

export default {
  // // 7.批量删除讲师
  // batchRemove(idList) {
  //   return request({
  //     url: '/admin/edu/teacher/batch-remove',
  //     method: 'delete',
  //     data: idList
  //   })
  // },
  // 6.更新讲师
  teacherUpdate(teacher) {
    return request({
      url: '/admin/edu/teacher/update',
      method: 'put',
      data: teacher
    })
  },
  // 5.删除讲师
  teacherRemove(id) {
    return request({
      url: `/admin/edu/teacher/remove/${id}`,
      method: 'delete'
    })
  },
  // 4.根据id获取讲师信息

  teacherGetById(id) {
    return request({
      url: `/admin/edu/teacher/get/${id}`,
      method: 'get'
    })
  },
  // 3.新增讲师
  teacherSave(teacher) {
    return request({
      url: '/admin/edu/teacher/save',
      method: 'post',
      data: teacher
    })
  },
  // 2.分页查询讲师
  teacherPage(page, limit, searchObj) {
    // debugger
    return request({
      url: `/admin/edu/teacher/list/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },
  // 1.查询讲师列表
  teacherList() {
    return request({
      url: '/admin/edu/teacher/list',
      method: 'get'
    })
  }
}
